<template>
  <div>
    <ul class="tvnavul">
      <li v-for="tvnav in tvnavdata" :key="tvnav.id" class="tvnali">
        <img class="TvNavimg" :src="tvnav.img" alt="" />
        <p class="TvNavp">{{tvnav.name}}</p>
      </li>
    </ul>
  </div>
</template>

<script>
// import axios from "axios";

export default {
  name: "TvNav",
  data: function () {
    return {
      tvnavs: [],
    };
  },
  created() {
    // axios({
    //   url: "/TvNav",
    // })
    //   .then((res) => {
    //     this.tvnavs = res.data;
    //   })
    //   .catch((err) => console.log("err404", err));

    this.$store.dispatch("LINK_TVNAV_DATA","/home/tvnav")


  },
   computed:{
      tvnavdata(){
        return this.$store.state.TvNavM.tvnav
      }
    }
};
</script>

<style scoped>
.tvnavul {
  /* background-color: rgb(243, 195, 255); */
  box-sizing: border-box;
  height: 1.05rem;
  margin: 0 0.15rem;
  display: flex;
  align-items: center;

  overflow: auto;
}
.tvnali {
  background-color: #fff;
  width: 0.6rem;
}

.tvnavul::-webkit-scrollbar {
  display: none;
}
.TvNavimg{
    width: .6rem;
    height: .46rem;
}
.tvnali{
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: .15rem;
}
.TvNavp{
  -webkit-transform: scale(0.833);
    margin-top: .08rem;
    font-size: .10rem;
}
</style>
